Fix misleading "Check Google Play" dialog when offline#23
Open
chamika wants to merge 3 commits into
Open
Conversation
The AAOS generic error dialog appeared over the Now Playing screen whenever ExoPlayer entered an error state with no handler. With Firebase and Google Play Services already removed, the dialog text is just the system's hardcoded template — the trigger was an unhandled PlaybackException, not a real GMS check. - Override Player.Listener.onPlayerError in DashTuneMusicService to recover gracefully: skip to the next item if available, otherwise stop and clear, so the session stops publishing an error state. - Filter onPlaybackResumption to drop saved tracks that aren't cached when offline, avoiding a known-broken queue on cold offline launch. - Harden AlbumArtContentProvider.openFile against network failures: catch IOException, throw the documented FileNotFoundException when no file ends up on disk, and add 10s OkHttp timeouts. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Returning LibraryResult.ofError from onGetLibraryRoot makes the Media3 to legacy MediaBrowserService bridge deliver a null root to AAOS Media Center, which responds with onConnectFailed and a blank screen — the sign-in PendingIntent in the error's extras never fires. Always return a valid root with the auth extras on the params instead; the existing auth check in onGetChildren still launches SignInActivity via the same PendingIntent. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Fix blank screen on fresh install plus offline error dialog and auto-resume crash Full release notes: - Fix blank Media Center screen when opening the app while signed out — the sign-in prompt now appears correctly again - Fix the "Something went wrong / Check Google Play" dialog that appeared on the Now Playing screen when the car had no internet - Skip auto-resuming previously played tracks that aren't cached on the device when offline, instead of getting stuck on "Loading content…" - Album art now falls back to a placeholder when offline instead of failing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PlaybackExceptionwith no handler.Player.Listener.onPlayerErrorto recover into a clean IDLE state (skip to next, or stop + clear), which prevents the dialog.onPlaybackResumptionnow filters out saved tracks that can't actually play (offline + not in the ExoPlayer download cache), so we don't hand the player a known-broken queue.AlbumArtContentProvider.openFilenow catchesIOException, throws the documentedFileNotFoundExceptionwhen no file lands on disk, and uses 10s OkHttp timeouts so the ContentProvider thread can't hang offline.Test plan
./gradlew :automotive:assembleDebug— builds clean./gradlew :automotive:testDebugUnitTest— all existing tests passonPlayerErrorfires; player skips to a cached next item if any, otherwise stops cleanly.AlbumArtContentProvider.🤖 Generated with Claude Code